﻿using System;
using System.Reflection;

namespace Ucto.ToExcelConvertor
{
	public class View : IView
	{
		public void DisplayHeader(string path)
		{
			DisplayMessage("ToExcelConvertor verzia {0}", Assembly.GetEntryAssembly().GetName().Version);
			DisplayMessage("Prikad pouzitia: Ucto.ToExcelConvertor.exe vstup.dat vystup.xls");
			DisplayMessage("Otvaram subor '{0}'", path);
		}

		public void DisplayFooter(double totalSeconds)
		{
			DisplayMessage("Hotovo.");
			DisplayMessage("Celkovy cas konvertovania do excelu: {0} sekund.", totalSeconds);
		}

		public void DisplayError(string message, Exception ex)
		{
			DisplayMessage(message);
			DisplayMessage("Detaily vynimky:");
			DisplayMessage(ex.ToString());
		}

		public void DisplayMessage(string message, params object[] p)
		{
			Console.WriteLine(message, p);
		}
	}
}
